﻿<%@ Page Title="" Language="C#" AutoEventWireup="true" CodeBehind="MyHome.aspx.cs"
    MasterPageFile="~/Main.Master" Inherits="NetDon.OA.Portal.MyHome" %>
<%@ Import Namespace="NetDon.OA.Portal" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title></title>
    <script type="text/javascript" src="Javascripts/swfobject.js"></script>
    <script type="text/javascript" src="Javascripts/jquery-1.4.1.js"></script>
    <script type="text/javascript" src="Javascripts/Common.js"></script>
    <style type="text/css">
        /* Reset */
        body, img, p, h1, h2, h3, h4, h5, h6, ul, ol
        {
            margin: 0;
            padding: 0;
            list-style: none;
            border: none;
        }
        /* End Reset */
    </style>
    <script type="text/javascript" language="javascript">       
        var primaryActiveState = "art";
        var subActiveState = "portfolio";
        var tittleText = "portfolio";
        var root = "";         

           var userDialogSize = { width: 900, height: window.top.$common.getClientBounds().height - 40 };

    

           function viewWorkDetailsEx(workflowApplyId, flowCategoryId, flowId) {
               $dialog('<%= ResolveUrl(SiteUrls.Workflow.ApproveDetail) %>?Action=2&WorkflowApplyId=' + workflowApplyId + '&FlowCategoryId=' + flowCategoryId + '&FlowId=' + flowId, userDialogSize, function (result) {
                   document.location.href = document.location.href;
               });
           }

           function viewUserEx(userId) {
               $dialog('<%= ResolveUrl(SiteUrls.Admin.UserDetail) %>?UserId=' + userId, userDialogSize);
           }

           function showNoticeDetailEx(NoticeId) {
               $dialog('<%= ResolveUrl(SiteUrls.MyWork.NoticeDetail) %>?NoticeId=' + NoticeId, userDialogSize);

           }

           function viewRejectedAndApprovedWorkDetailsEx(workflowApplyId, flowCategoryId, flowId, workflowInstanceStatus) {
            $dialog('<%= ResolveUrl(SiteUrls.Workflow.ApproveDetail) %>?Action=1&IsMyApply=true&WorkflowApplyId=' + workflowApplyId + '&FlowCategoryId=' + flowCategoryId + '&FlowId=' + flowId + '&workflowInstanceStatus=' + workflowInstanceStatus, userDialogSize) 

           }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">    
        <div align="center" class="ListPanel">
            <div class="ListTitle">
                <div class="Header">快速通道</div><div class="More"></div>
            </div>
            <div id="flashcontent" class="ListBody">
                <div id="flashError">
                    <h1>
                        You need to upgrade your Flash Player</h1>
                    <p>
                        To view this page you need to have Flash Player 9, and JavaScript turned on. Please
                        <a href="http://www.adobe.com/go/getflashplayer">upgrade you player</a> - it is
                        free, and takes only a few moments. If you belive you <em>do</em> have Flash Player
                        9 installed, you may <a href="index.html?detectflash=false">bypass the detection</a>
                        if you wish.
                    </p>
                </div>
            </div>
            <script type="text/javascript">
					// <![CDATA[

                var so = new SWFObject("flash/imageshow.swf", "albums", "750", "200", "9", "#fff");
                so.addParam("scale", "noscale");
                so.write("flashcontent");
					
					// ]]>
            </script>
        </div>
        <div id="columns">
            <ul id="column1" class="column">
                <li class="widget color-blue" id="intro">
                    <div class="widget-head">
                        <span class="headfont">我的日程</span>
                    </div>
                    <div class="widget-content">
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <asp:Repeater ID="repCalendar" runat="server">
                                <ItemTemplate>
                                    <tr>
                                        <td align="center">
                                            <table border="0" cellpadding="1" cellspacing="1" class="innerTable">
                                                <tr>
                                                    <td align="left">
                                                        <asp:Image ID="Image1" SkinID="MyHomeList" runat="server" CssClass="img" /><%# DataBinder.Eval(Container.DataItem,"Subject") %>
                                                    </td>
                                                    <td align="right">
                                                        <asp:Label ID="lblCreatTime" Text='<%# DataBinder.Eval(Container.DataItem,"StartTime","{0:yyyy-MM-dd}")%>'
                                                            runat="server"></asp:Label>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                                <FooterTemplate>
                                    <tr>
                                        <td colspan="2" class="widget-foot">
                                            <asp:LinkButton ID="lnkMoreNews" runat="server" OnClick="lnkMoreNews_Click" CssClass="Linker">更多…</asp:LinkButton>
                                        </td>
                                    </tr>
                                </FooterTemplate>
                            </asp:Repeater>
                        </table>
                    </div>
                </li>
                <li class="widget color-blue">
                    <div class="widget-head">
                        <span class="headfont">生日提醒</span>
                    </div>
                    <div class="widget-content">
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <asp:Repeater ID="repBirthdayReminders" runat="server" 
                                onitemdatabound="repBirthdayReminders_ItemDataBound">
                                <ItemTemplate>
                                    <tr>
                                        <td align="left">
                                            <asp:Image ID="Image1" SkinID="MyHomeList" runat="server" CssClass="img" />
                                            <%--<asp:LinkButton ID="lnkTransferFiles" runat="server"  CssClass="Linker">--%><%# DataBinder.Eval(Container.DataItem, "FullName")%><%--</asp:LinkButton>--%>
                                           <%--<asp:LinkButton ID="LinkButton1" runat="server"  CssClass="Linker">--%><%# DataBinder.Eval(Container.DataItem, "DepartmentName")%><%--</asp:LinkButton>--%>
                                           <asp:HiddenField ID="UserID" runat="server"  Value='<%#Eval("UserId") %>'/>
                                        </td>
                                        <td align="right">
                                            <asp:Label ID="lblCreatTime" Text='<%# DataBinder.Eval(Container.DataItem,"Birthday","{0:yyyy-MM-dd}")%>'
                                                runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                                <FooterTemplate>
                                    <tr>
                                        <td colspan="2" class="widget-foot">
                                            <asp:LinkButton ID="lnkMoreBirthdayReminders" runat="server" OnClick="lnkMoreBirthdayReminders_Click"
                                                CssClass="Linker">更多…</asp:LinkButton>
                                        </td>
                                    </tr>
                                </FooterTemplate>
                            </asp:Repeater>
                        </table>
                    </div>
                </li>
                <li class="widget color-blue">
                    <div class="widget-head">
                        <span class="headfont">我的申请</span>
                    </div>
                    <div class="widget-content">

                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <asp:Repeater ID="RepeaterMyApply" runat="server" 
                                onitemdatabound="repMyApply_ItemDataBound"  >
                                <ItemTemplate>
                                    <tr>
                                        <td align="left">
                                            <asp:Image ID="Image1" SkinID="MyHomeList" runat="server" CssClass="img" />
                                            <asp:LinkButton ID="lnkSubject" runat="server"   CssClass="Linker"><%# DataBinder.Eval(Container.DataItem, "Subject")%></asp:LinkButton>
                                           
                                        </td>
                                       <%-- <td> <asp:LinkButton ID="LinkButtonNoticeContent" runat="server"   CssClass="Linker"><%# DataBinder.Eval(Container.DataItem, "NoticeContent")%></asp:LinkButton></td>--%>
                                        <td align="right">
                                           <%--   <asp:Label ID="lblCreatTime" Text='<%# DataBinder.Eval(Container.DataItem,"ApplyDate","{0:yyyy-MM-dd}")%>'
                                                runat="server"></asp:Label>--%>
                                            <asp:Label ID="lblApplyStatus" Text='<%# DataBinder.Eval(Container.DataItem,"Status")%>'
                                                runat="server"></asp:Label>
                                                 <asp:HiddenField ID="workflowApplyId" runat="server" Value='<%#Eval("WorkflowApplyId") %>' />
                                                 <asp:HiddenField ID="flowCategoryId" runat="server" Value='<%#Eval("FlowCategoryId") %>' />
                                                  <asp:HiddenField ID="flowId" runat="server" Value='<%#Eval("FlowId") %>' />
                                        </td>
                                    </tr>
                                </ItemTemplate>
                                <FooterTemplate>
                                    <tr>
                                        <td colspan="3" class="widget-foot">
                                            <asp:LinkButton ID="lnkNotice" runat="server" OnClick="lnkMyApplyMore_Click"
                                                CssClass="Linker">更多…</asp:LinkButton>
                                        </td>
                                    </tr>
                                </FooterTemplate>
                            </asp:Repeater>
                        </table>

                    </div>
                </li>
            </ul>
            <ul id="column3" class="column">
                <li class="widget color-blue">
                    <div class="widget-head">
                        <span class="headfont">待办事项</span>
                    </div>
                    <div class="widget-content">

                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <asp:Repeater ID="repNeedMyApprovalReminders" runat="server" 
                                onitemdatabound="repNeedMyApprovalReminders_ItemDataBound"  >
                                <ItemTemplate>
                                    <tr>
                                        <td align="left">
                                            <asp:Image ID="Image1" SkinID="MyHomeList" runat="server" CssClass="img" />
                                            <asp:LinkButton ID="lnkTransferFiles" runat="server"   CssClass="Linker"><%# DataBinder.Eval(Container.DataItem, "Subject")%></asp:LinkButton>
                                           
                                        </td>
                                        <td> <asp:LinkButton ID="LinkButton1" runat="server"   CssClass="Linker"><%# DataBinder.Eval(Container.DataItem, "ApplyUser")%></asp:LinkButton></td>
                                        <td align="right">
                                         <%--   <asp:Label ID="lblCreatTime" Text='<%# DataBinder.Eval(Container.DataItem,"ApplyDate","{0:yyyy-MM-dd}")%>'
                                                runat="server"></asp:Label>--%>
                                                <asp:HiddenField ID="workflowApplyId" runat="server" Value='<%#Eval("WorkflowApplyId") %>' />
                                                 <asp:HiddenField ID="flowCategoryId" runat="server" Value='<%#Eval("FlowCategoryId") %>' />
                                                  <asp:HiddenField ID="flowId" runat="server" Value='<%#Eval("FlowId") %>' />
                                        </td>
                                    </tr>
                                </ItemTemplate>
                                <FooterTemplate>
                                    <tr>
                                        <td colspan="3" class="widget-foot">
                                            <asp:LinkButton ID="lnkMoreNeedMyApprovalReminders" runat="server" OnClick="lnkMoreNeedMyApprovalReminders_Click"
                                                CssClass="Linker">更多…</asp:LinkButton>
                                        </td>
                                    </tr>
                                </FooterTemplate>
                            </asp:Repeater>
                        </table>

                    </div>
                </li>
                 <li class="widget color-blue">
                    <div class="widget-head">
                        <span class="headfont">公告</span>
                    </div>
                    <div class="widget-content">

                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <asp:Repeater ID="RepeaterNotice" runat="server" 
                                onitemdatabound="repNotice_ItemDataBound"  >
                                <ItemTemplate>
                                    <tr>
                                        <td align="left">
                                            <asp:Image ID="Image1" SkinID="MyHomeList" runat="server" CssClass="img" />
                                            <asp:LinkButton ID="lnkTitle" runat="server"   CssClass="Linker"><%# DataBinder.Eval(Container.DataItem, "Title")%></asp:LinkButton>
                                           
                                        </td>
                                       <%-- <td> <asp:LinkButton ID="LinkButtonNoticeContent" runat="server"   CssClass="Linker"><%# DataBinder.Eval(Container.DataItem, "NoticeContent")%></asp:LinkButton></td>--%>
                                        <td align="right">
                                            <asp:Label ID="lbNoticelCreatTime" Text='<%# DataBinder.Eval(Container.DataItem,"CreateTime","{0:yyyy-MM-dd}")%>'
                                                runat="server"></asp:Label>
                                                <asp:HiddenField ID="NoticeId" runat="server" Value='<%#Eval("NoticeId") %>' />
                                                <%-- <asp:HiddenField ID="flowCategoryId" runat="server" Value='<%#Eval("FlowCategoryId") %>' />
                                                  <asp:HiddenField ID="flowId" runat="server" Value='<%#Eval("FlowId") %>' />--%>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                                <FooterTemplate>
                                    <tr>
                                        <td colspan="3" class="widget-foot">
                                            <asp:LinkButton ID="lnkNotice" runat="server" OnClick="lnkNoticeMore_Click"
                                                CssClass="Linker">更多…</asp:LinkButton>
                                        </td>
                                    </tr>
                                </FooterTemplate>
                            </asp:Repeater>
                        </table>

                    </div>
                </li>
            </ul>
        </div>    
    <script type="text/javascript" src="App_Themes/Default/Widgets/jquery-ui-personalized-1.6rc2.min.js"></script>
    <script type="text/javascript" src="App_Themes/Default/Widgets/inettuts.js" charset="gb2312"></script>
    <script language="javascript" type="text/javascript">



        //var request = Sys.WebForms.PageRequestManager.getInstance();
        $(function () {
            Master_AutoSize();
            $addHandler(window, 'resize', Master_AutoSize);
        })

        function Master_AutoSize() {
            var bounds = $common.getClientBounds();
            $common.setSize($get('workContent'), { width: bounds.width, height: bounds.height });
        }      
    </script>
</asp:Content>
